<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单行注释</title>
</head>

<body>
    <h1 id="myH"></h1>
    <p id="myP"></p>
    <script>
        // 改变标题：
        document.getElementById("myH").innerHTML = "JavaScript 注释";
        // 改变段落：
        document.getElementById("myP").innerHTML = "我的第一个段落。";
    </script>
</body>

</html>